'use strict';

const path = require('path');
module.exports = () => {
  const config = (exports = {});
  config.cluster = {
    listen: {
      path: '',
      port: 7002,
      hostname: '127.0.0.1',
    },
  };
  config.sequelize = {
    dialect: 'mysql',
    host: '127.0.0.1',
    port: 3306,
    username: 'root',
    password: '',
    database: 'codequan',
    timezone: '+08:00',
    define: {
      charset: 'utf8mb4', // 设置能显示中文
      freezeTableName: true,
    },
  };

  config.logger = {
    level: 'DEBUG',
    dir: path.resolve(__dirname, '../logs/prod'),
  };
  return {
    ...config,
  };
};
